<!DOCTYPE html>
<html>
<head>
    <title>Multiplication v1</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
    <script src="multiplication-client.js"></script>
    <script src="gamification-client.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <h1 class="text-center">Welcome to Social Multiplication</h1>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6">
            <h3 class="text-center">Your new challenge is</h3>
            <h1 class="text-center">
                <span class="multiplication-a"></span> x <span class="multiplication-b"></span>
            </h1>
            <p>
            <form id="attempt-form">
                <div class="form-group">
                    <label for="result-attempt">Result?</label>
                    <input type="text" name="result-attempt" id="result-attempt" class="form-control">
                </div>
                <div class="form-group">
                    <label for="user-alias">Your alias:</label>
                    <input type="text" name="user-alias" id="user-alias" class="form-control">
                </div>
                <input type="submit" value="Check" class="btn btn-default">
            </form>
            </p>
            <div class="result-message"></div>

            <div id="stats-div" style="display: none;">
                <h2>Your statistics</h2>
                <table id="stats" class="table">
                    <tbody>
                    <tr>
                        <td class="info">User ID:</td>
                        <td id="stats-user-id"></td>
                    </tr>
                    <tr>
                        <td class="info">Score:</td>
                        <td id="stats-score"></td>
                    </tr>
                    <tr>
                        <td class="info">Badges:</td>
                        <td id="stats-badges"></td>
                    </tr>
                    </tbody>
                </table>
            </div>

        </div>
        <div class="col-md-6">
            <h3>Leaderboard</h3>
            <table id="leaderboard" class="table">
                <tr>
                    <th>User ID</th>
                    <th>Score</th>
                </tr>
                <tbody id="leaderboard-body"></tbody>
            </table>
            <div class="text-right">
                <button id="refresh-leaderboard" class="btn btn-default" type="submit">Refresh</button>
            </div>

            <div id="results-div" style="display: none;">
                <h2>Your latest attempts</h2>
                <table id="results" class="table">
                    <tr>
                        <th>Attempt ID</th>
                        <th>Multiplication</th>
                        <th>You entered</th>
                        <th>Correct?</th>
                    </tr>
                    <tbody id="results-body"></tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<script src="js/bootstrap.min.js"></script>
</body>
</html>